<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>影评中心</title>
    <%- include common %>
</head>

<body>
    <%- include('head',{title:'movies',username:username})%>

        <div class="container" style="margin-top: 60px;margin-bottom: 60px;z-index: 999;">
            <h2 class="text-success">电影中心</h2>
            <button type="button" class="btn btn-primary" onclick="location.href='/movies'">默认排序</button>
            <button type="button" class="btn btn-primary" onclick="location.href='/moviesyear'">按年份排序</button>
            <button type="button" class="btn btn-primary" onclick="location.href='/moviesaverage'">按年份排序</button>
            <div class="container-fluid">
                <%   result.forEach((item,i)=>{ %>

                    <div class="col-md-3 mv-item">
                        <a href="/detail?mid=<%- item.id%>" style="display: block; ">
                            <div style="height: 260px; margin-top: 20px;width: 100%;">
                                <img style="height: 100%;width: 90%;" src="<%- item.images.large.replace(/img7/,'img3') %>" alt="">
                            </div>
                            <h4>片名：
                                <%- item.title%>
                                    </h3>
                                    <p> 年份:
                                        <%- item.year%>
                                    </p>
                                    <h5>类型:
                                        <%- item.genres%>
                                    </h5>
                                    <h5>评分：
                                        <%- item.rating.average%>
                                    </h5>
                        </a>
                    </div>

                    <%     })   %>

            </div>
        </div>



        <%- include foot%>

</body>

</html>